//
//  PersonSetNameTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/8/13.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "PersonSetNameTableViewCell.h"

@implementation PersonSetNameTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.nameLabel];
    [self.contentView addSubview:self.detailLabel];
}

-(UILabel *)nameLabel
{
    if(_nameLabel == nil)
    {
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 17.5, 100, 20)];
        _nameLabel.font = font(15);
        _nameLabel.textColor = SFM51;
        _nameLabel.textAlignment = NSTextAlignmentLeft;
        _nameLabel.text = @"昵称";
    }
    return _nameLabel;
}

-(UILabel *)detailLabel{
    if(_detailLabel == nil)
    {
        _detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(130, 17.5, WIDTH - 170, 20)];
        _detailLabel.font = font(15);
        _detailLabel.textColor = SFM153;
        _detailLabel.textAlignment = NSTextAlignmentRight;
    }
    return _detailLabel;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
